package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysErrorConditionsMapper;
import com.ruoyi.system.domain.SysErrorConditions;
import com.ruoyi.system.service.ISysErrorConditionsService;

/**
 * 故障条件Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-11
 */
@Service
public class SysErrorConditionsServiceImpl implements ISysErrorConditionsService 
{
    @Autowired
    private SysErrorConditionsMapper sysErrorConditionsMapper;

    /**
     * 查询故障条件
     * 
     * @param conId 故障条件主键
     * @return 故障条件
     */
    @Override
    public SysErrorConditions selectSysErrorConditionsByConId(Long conId)
    {
        return sysErrorConditionsMapper.selectSysErrorConditionsByConId(conId);
    }

    /**
     * 查询故障条件列表
     * 
     * @param sysErrorConditions 故障条件
     * @return 故障条件
     */
    @Override
    public List<SysErrorConditions> selectSysErrorConditionsList(SysErrorConditions sysErrorConditions)
    {
        return sysErrorConditionsMapper.selectSysErrorConditionsList(sysErrorConditions);
    }

    /**
     * 新增故障条件
     * 
     * @param sysErrorConditions 故障条件
     * @return 结果
     */
    @Override
    public int insertSysErrorConditions(SysErrorConditions sysErrorConditions)
    {
        return sysErrorConditionsMapper.insertSysErrorConditions(sysErrorConditions);
    }

    /**
     * 修改故障条件
     * 
     * @param sysErrorConditions 故障条件
     * @return 结果
     */
    @Override
    public int updateSysErrorConditions(SysErrorConditions sysErrorConditions)
    {
        return sysErrorConditionsMapper.updateSysErrorConditions(sysErrorConditions);
    }

    /**
     * 批量删除故障条件
     * 
     * @param conIds 需要删除的故障条件主键
     * @return 结果
     */
    @Override
    public int deleteSysErrorConditionsByConIds(Long[] conIds)
    {
        return sysErrorConditionsMapper.deleteSysErrorConditionsByConIds(conIds);
    }

    /**
     * 删除故障条件信息
     * 
     * @param conId 故障条件主键
     * @return 结果
     */
    @Override
    public int deleteSysErrorConditionsByConId(Long conId)
    {
        return sysErrorConditionsMapper.deleteSysErrorConditionsByConId(conId);
    }

    @Override
    public List<SysErrorConditions> selectConditionsListByErrorCodes(String[] errorCodeList) {
        return sysErrorConditionsMapper.selectConditionsListByErrorCodes(errorCodeList);
    }
}
